const _import =
  process.env.NODE_ENV === 'production'
    ? file => () => import('@/views/modules/' + file + '.vue')
    : file => require('@/views/modules/' + file + '.vue').default

export default [
  {
    path: 'sys/user',
    component: _import('system/user'),
    name: 'system-user',
    meta: { title: '用户管理', permission: 'front:page:sys:user' }
  },
  {
    path: 'sys/dept',
    component: _import('system/department'),
    name: 'system-dept',
    meta: { title: '部门管理', permission: 'front:page:sys:dept' }
  },
  {
    path: 'sys/comp',
    component: _import('system/company'),
    name: 'system-comp',
    meta: { title: '公司管理', permission: 'front:page:sys:comp' }
  },
  {
    path: 'sys/role',
    component: _import('system/role'),
    name: 'system-role',
    meta: { title: '角色管理', permission: 'front:page:sys:role' }
  },
  {
    path: 'sys/dictUser',
    component: _import('system/dict-user'),
    name: 'system-dict-user',
    meta: { title: '用户字典', permission: 'front:page:sys:dictUser' }
  },
  {
    path: 'sys/dictUser/data/:dictId',
    component: _import('system/dict-user-data'),
    name: 'system-dict-user-data',
    meta: { title: '字典数据', multipage: true, permission: 'sys:clientDictDataMgr:view' }
  },
  {
    path: 'sys/scene',
    component: _import('system/scene'),
    name: 'system-scene',
    meta: { title: '场景管理', permission: 'front:page:sys:scene' }
  },
  {
    path: 'sys/platform',
    component: _import('system/platform'),
    name: 'system-platform',
    meta: { title: '平台管理', permission: 'front:page:sys:platform' }
  },
  {
    path: 'sys/schedule',
    component: _import('system/schedule/params'),
    name: 'system-schedule',
    meta: { title: '调度任务', permission: 'front:page:sys:schedule' }
  },
  {
    path: 'sys/params',
    component: _import('system/params/params'),
    name: 'system-params',
    meta: { title: '参数管理', permission: 'front:page:sys:params' }
  },
  {
    path: 'sys/process',
    component: _import('process/process'),
    name: 'system-process',
    meta: { title: '流程管理', permission: 'front:page:sys:process' }
  },
  {
    path: 'sys/bulletin',
    component: _import('system/bulletin/bulletin'),
    name: 'system-bulletin',
    meta: { title: '系统公告管理', permission: 'front:page:sys:bulletin' }
  },
  {
    path: 'sys/record',
    component: _import('system/record/record'),
    name: 'system-record',
    meta: { title: '网站流量监控', permission: 'front:page:sys:record' }
  },
  {
    path: 'sys/record/trend',
    component: _import('system/record/record-trend-detail'),
    name: 'system-record-trend',
    meta: { title: '趋势详情-网站流量', isTab: true, permission: 'front:page:sys:record' }
  },
  {
    path: 'sys/record/browse',
    component: _import('system/record/record-browse-detail'),
    name: 'system-record-browse',
    meta: { title: '浏览详情-网站流量', isTab: true, permission: 'front:page:sys:record' }
  },
  {
    path: 'sys/record/user',
    component: _import('system/record/record-user-detail'),
    name: 'system-record-user',
    meta: { title: '访问详情-网站流量', isTab: true, permission: 'front:page:sys:record' }
  },
  {
    path: 'sys/record/user/:userId',
    component: _import('system/record/record-user-detail-user'),
    name: 'system-record-user-detail',
    meta: { title: '用户访问详情-网站流量', isTab: true, multipage: 'userId', permission: 'front:page:sys:record' }
  },
  {
    path: 'sys/service',
    component: _import('system/service/service'),
    name: 'system-service',
    meta: { title: '系统服务监控', isTab: true, permission: 'front:page:sys:service' }
  },
  {
    path: 'sys/log',
    component: _import('system/log/log'),
    name: 'system-log',
    // 权限还需修改
    meta: { title: '日志', permission: 'front:page:sys:log' }
  }
]
